It is frequently necessary to generate for a computer display pixel values for pixels in first and second regions of the display. Pixels in each region of the display will share a common characteristic, such as colour. One example is to generate a character or other image on a display, the image defining a first region of the display and being displayed in a foreground colour, while the second region of the display is a background having a background colour. Fonts for defining such characters or images are often stored using one bit for each pixel. For example, a zero indicates the background and a one indicates the foreground.
In contrast, video display devices often require several bits to define each pixel, in order to display several colours simultaneously. Thus, each pixel value is represented by a sequence of bits, for example 8 or 32 bits.
In order to display a stored font on such a display device, it is therefore necessary to expand the compressed font information so that each pixel is represented by the required length of bit sequence used by the display device.
In existing systems, this is done by using the single bit font data word by word to address a look-up table which holds the full, expanded mask for each word. This requires that the look-up table be held in memory, using up a large amount of memory capacity. This can have a negative impact on cache accesses and can slow down the computer system.
In one aspect, the present invention provides a simple and effective way of carrying out this expansion in a computer system.